<?php
    class Course extends AppModel {
    public $name = 'Course';
    public $hasMany = array(''); // $hasMany shows the association of the course table with other tables. it could be just 'has', 'hasAndBelongsToMany', or just $hasMany. see documentation for more details. 
	
	public function searchcourses(){
	// There are two ways of interacting with the database. One is to use builtin function like find(), the other is to used simple sql queries. Examples for both are given.
	
	//	$array = $this->find('all');
		$query = 'SELECT * FROM `courses` WHERE 1';
		$array = $this->query($query);
		return $array;
		
	}

	}
?>